﻿using SqlSugar;
using System;

namespace Model
{
    /// <summary>
    /// lend_item 表实体类
    /// </summary>
    [SugarTable("lend_item")]
    public class LendItem
    {
        /// <summary>
        /// 编号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
        public long Id { get; set; }

        /// <summary>
        /// 投资编号
        /// </summary>
        [SugarColumn(ColumnName = "lend_item_no")]
        public string LendItemNo { get; set; }

        /// <summary>
        /// 标的id
        /// </summary>
        [SugarColumn(ColumnName = "lend_id")]
        public long LendId { get; set; }

        /// <summary>
        /// 投资用户id
        /// </summary>
        [SugarColumn(ColumnName = "invest_user_id")]
        public long? InvestUserId { get; set; }

        /// <summary>
        /// 投资人名称
        /// </summary>
        [SugarColumn(ColumnName = "invest_name")]
        public string InvestName { get; set; }

        /// <summary>
        /// 投资金额
        /// </summary>
        [SugarColumn(ColumnName = "invest_amount")]
        public decimal? InvestAmount { get; set; }

        /// <summary>
        /// 年化利率
        /// </summary>
        [SugarColumn(ColumnName = "lend_year_rate")]
        public decimal? LendYearRate { get; set; }

        /// <summary>
        /// 投资时间
        /// </summary>
        [SugarColumn(ColumnName = "invest_time")]
        public DateTime? InvestTime { get; set; }

        /// <summary>
        /// 开始日期
        /// </summary>
        [SugarColumn(ColumnName = "lend_start_date")]
        public DateTime? LendStartDate { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        [SugarColumn(ColumnName = "lend_end_date")]
        public DateTime? LendEndDate { get; set; }

        /// <summary>
        /// 预期收益
        /// </summary>
        [SugarColumn(ColumnName = "expect_amount")]
        public decimal? ExpectAmount { get; set; }

        /// <summary>
        /// 实际收益
        /// </summary>
        [SugarColumn(ColumnName = "real_amount")]
        public decimal? RealAmount { get; set; }

        /// <summary>
        /// 状态（0：默认 1：已支付 2：已还款）
        /// </summary>
        [SugarColumn(ColumnName = "status")]
        public byte? Status { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "create_time")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnName = "update_time")]
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 逻辑删除(1:已删除，0:未删除)
        /// </summary>
        [SugarColumn(ColumnName = "is_deleted")]
        public byte IsDeleted { get; set; }

    }
}
